﻿<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="ManagementRoles.aspx.cs" 
    Inherits="GMAC.ReportingSystem.Paginas.ManagementRoles" Theme="Theme" EnableTheming="true"
    EnableEventValidation="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>

    <script type="text/javascript" src="../Scripts/CheckFramesAndRedirect.js"></script>

    <script type="text/javascript">
        function ExpandPanel()
        {
            var pnlDetailsExtender = $find("pnlDetailsExtender");
            var pnlSearchExtender = $find("pnlSearchExtender");
            if (pnlDetailsExtender != null)
                pnlDetailsExtender.expandPanel();
            pnlSearchExtender.collapsePanel();
        }
    </script>

</head>
<body class="TotalBody">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="Contenedor" style = "padding-bottom: 10px; padding-top:10px;">
        <table cellpadding="0" cellspacing="0" border="0" style="width: 98%; vertical-align: top">
            <tr>
                <td  style="text-align:left" >
                    <span class="FontArialPaddingLeft15 TitleFontBlue FontArialBoldCaps">Roles</span>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <div class="WindowHeightMain">
                        <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; vertical-align: top">
                            <tr>
                                <td class="TDSeparadorV" colspan="2">
                                </td>
                            </tr>
                            <tr class="SearchBackground" style="width: 100%">
                                <td class="TDBorder">
                                    <table cellpadding="0" cellspacing="0" border="0">
                                        <tr>
                                            <td style="padding-left: 10px; text-align: left; width: 100%">
                                                <span class="FontArialBoldCaps" style="font-size: 14px">Search Filter</span>
                                            </td>
                                            <td style="padding-right: 10px; text-align: right">
                                                <asp:ImageButton ID="imgCollapseSearch" ImageAlign="Middle" ImageUrl="~/App_Themes/Theme/Images/Images IE6/Minus.gif"
                                                    Width="25px" Height="25px" runat="server" BorderWidth="0px" OnClientClick="return false;"
                                                    CausesValidation="false" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:Panel ID="pnlSearch" runat="server" SkinID="pnlBusqueda" Height="42px">
                                        <table cellpadding="0" cellspacing="0" border="0" visible="false">
                                            <tr>
                                                <td>
                                                    <table cellpadding="0" cellspacing="0" border="0">
                                                        <tr style="padding-left: 10px">
                                                            <td style="padding-left: 5px" class="LabelRight12px TDLabelBackground">
                                                                Role
                                                            </td>
                                                            <td class="TDTextBox">
                                                                <asp:TextBox ID="txtNameSearch" runat="server" MaxLength="30" SkinID="TextBox12px"
                                                                    TextMode="SingleLine" TabIndex="1"></asp:TextBox>
                                                                <cc1:FilteredTextBoxExtender ID="filterNameSearch" runat="server" SkinID="filterAlphanumeric"
                                                                    TargetControlID="txtNameSearch">
                                                                </cc1:FilteredTextBoxExtender>
                                                            </td>
                                                            <td id="Botones" style="vertical-align: middle">
                                                                <asp:ImageButton ID="imgBuscarReg" ImageAlign="Middle" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Find.jpg"
                                                                    Height="25px" runat="server" OnClick="imgBuscarReg_Click" CausesValidation="false" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                    </asp:Panel>
                                    <cc1:CollapsiblePanelExtender ID="pnlSearch_Collapse" runat="server" TargetControlID="pnlSearch"
                                        BehaviorID="pnlSearchExtender" CollapsedImage="~/App_Themes/Theme/Images/Images IE6/Plus.gif"
                                        ExpandedImage="~/App_Themes/Theme/Images/Images IE6/Minus.gif" CollapseControlID="imgCollapseSearch"
                                        ExpandControlID="imgCollapseSearch" Collapsed="false" SuppressPostBack="false"
                                        ImageControlID="imgCollapseSearch">
                                    </cc1:CollapsiblePanelExtender>
                                </td>
                            </tr>
                            <tr>
                                <td class="TDSeparadorV" colspan="2">
                                </td>
                            </tr>
                            <tr class="SearchBackground" style="width: 100%">
                                <td class="TDBorder">
                                    <table cellpadding="0" cellspacing="0" border="0">
                                        <tr>
                                            <td style="padding-left: 10px; text-align: left; width: 100%">
                                                <span class="FontArialBoldCaps" style="font-size: 14px">Edit Fields</span>
                                            </td>
                                            <td style="padding-right: 10px; text-align: right">
                                            </td>
                                            <td style="padding-right: 10px; text-align: right">
                                                <asp:ImageButton ID="imgCollapseEdit" ImageAlign="Middle" ImageUrl="~/App_Themes/Theme/Images/Images IE6/Minus.gif"
                                                    OnClientClick="return false;" CausesValidation="false" Width="25px" Height="25px"
                                                    runat="server" BorderWidth="0px" TabIndex="3" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:UpdatePanel ID="upDetails" runat="server" UpdateMode="Conditional">
                                        <Triggers>
                                            <asp:AsyncPostBackTrigger ControlID="btnModify" EventName="Click" />
                                        </Triggers>
                                        <ContentTemplate>
                                            <asp:Panel ID="pnlEdit" runat="server" SkinID="pnlBusqueda" Height="143px">
                                                <table cellpadding="0" cellspacing="0" border="0" visible="false">
                                                    <tr>
                                                        <td valign="top">
                                                            <table cellpadding="0" cellspacing="0" border="0">
                                                                <tr style="padding-left: 10px">
                                                                    <td style="padding-left: 5px" class="LabelRight12px TDLabelBackground">
                                                                        Role
                                                                    </td>
                                                                    <td class="TDTextBox">
                                                                        <asp:HiddenField ID="hfRolId" runat="server" /><asp:TextBox ID="txtName" runat="server" MaxLength="30" SkinID="TextBox12px" TextMode="SingleLine"
                                                                            TabIndex="4"></asp:TextBox>
                                                                        <cc1:FilteredTextBoxExtender ID="filterName" runat="server" SkinID="filterAlphanumeric"
                                                                            TargetControlID="txtName">
                                                                        </cc1:FilteredTextBoxExtender>
                                                                        <asp:RequiredFieldValidator ID="rfvName" runat="server" ControlToValidate="txtName">*</asp:RequiredFieldValidator>
                                                                        <cc1:ValidatorCalloutExtender ID="vceName" runat="server" TargetControlID="rfvName">
                                                                        </cc1:ValidatorCalloutExtender>
                                                                    </td>
                                                                </tr>
                                                                <tr style="padding-left: 10px">
                                                                    <td style="padding-left: 5px" class="LabelRight12px TDLabelBackground">
                                                                        Description
                                                                    </td>
                                                                    <td class="TDTextBox">
                                                                        <asp:TextBox ID="txtDescription" runat="server" MaxLength="200" SkinID="TextBox12px"
                                                                            TextMode="SingleLine" TabIndex="5"></asp:TextBox>
                                                                        <cc1:FilteredTextBoxExtender ID="filterDescription" runat="server" SkinID="filterAlphanumeric"
                                                                            TargetControlID="txtDescription">
                                                                        </cc1:FilteredTextBoxExtender>
                                                                        <asp:RequiredFieldValidator ID="rfvDescription" runat="server" ControlToValidate="txtDescription">*</asp:RequiredFieldValidator>
                                                                        <cc1:ValidatorCalloutExtender ID="vceDescription" runat="server" TargetControlID="rfvDescription">
                                                                        </cc1:ValidatorCalloutExtender>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                        <td class="TDSeparadorH">
                                                        </td>
                                                        <td valign="top">
                                                            <table cellpadding="0" cellspacing="0" border="0">
                                                                <tr style="padding-left: 10px">
                                                                    <td style="padding-left: 5px" class="LabelRight12px TDLabelBackground" >
                                                                        Status
                                                                    </td>
                                                                    <td class="TDTextBox" style="font-family:Verdana; font-size:13px">
                                                                        <asp:RadioButtonList ID="optOptions" runat="server">
                                                                            <asp:ListItem Selected="True" Value="True">Active</asp:ListItem>
                                                                            <asp:ListItem Value="False">Inactive</asp:ListItem>
                                                                        </asp:RadioButtonList>
                                                                        <asp:RequiredFieldValidator ID="rfvOptions" runat="server" ControlToValidate="optOptions">*</asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td id="BotonesEdit" style="vertical-align: middle; width: 100%;" align="right" colspan="3">
                                                            <asp:ImageButton ID="btnSave" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Save.jpg"
                                                                OnClick="btnSave_Click" CausesValidation="true" TabIndex="8" />
                                                            <asp:ImageButton ID="btnPermits" runat="server" CausesValidation="false" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Enter.jpg"
                                                                OnClick="btnPermits_Click" />
                                                            <asp:ImageButton ID="btnNew" runat="server" CausesValidation="true" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_New.jpg"
                                                                OnClick="btnNew_Click" TabIndex="9" />
                                                            <asp:ImageButton ID="btnCancel" runat="server" CausesValidation="false" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Cancel.gif"
                                                                OnClick="btnCancel_Click" TabIndex="10" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </asp:Panel>
                                            <cc1:CollapsiblePanelExtender ID="pnlEdit_Collapse" runat="server" TargetControlID="pnlEdit"
                                                BehaviorID="pnlDetailsExtender" CollapsedImage="~/App_Themes/Theme/Images/Images IE6/Plus.gif"
                                                ExpandedImage="~/App_Themes/Theme/Images/Images IE6/Minus.gif" CollapseControlID="imgCollapseEdit"
                                                ExpandControlID="imgCollapseEdit" Collapsed="true" SuppressPostBack="false" ImageControlID="imgCollapseEdit">
                                            </cc1:CollapsiblePanelExtender>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                            <tr>
                                <td class="TDSeparadorV" colspan="2">
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left" colspan="2">
                                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                        <ContentTemplate>
                                            <asp:GridView ID="grvRoles" runat="server" AutoGenerateColumns="False" DataKeyNames="RoleID"
                                                OnRowDataBound="grvRoles_RowDataBound" SkinID="GridGMAC" TabIndex="11" Width="100%">
                                                <Columns>
                                                    <asp:BoundField DataField="Name" HeaderText="Role" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
                                                    <asp:BoundField DataField="Description" HeaderText="Description" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
                                                    <asp:BoundField DataField="Status" HeaderText="Status" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                                    <ItemTemplate>
                                                        <asp:HiddenField ID="hfStatus" runat="server" Value='<%# Eval("Status") %>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                </Columns>
                                                <HeaderStyle HorizontalAlign="Center" />
                                            </asp:GridView>
                                        </ContentTemplate>
                                        <Triggers>
                                            <asp:AsyncPostBackTrigger ControlID="grvRoles" EventName="SelectedIndexChanged" />
                                            <asp:AsyncPostBackTrigger ControlID="imgBuscarReg" EventName="Click" />
                                        </Triggers>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: right;">
                                    <asp:UpdatePanel ID="upMessageConfirm" runat="server">
                                        <ContentTemplate>
                                            <asp:ImageButton ID="btnModify" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Modify.jpg"
                                                OnClick="btnModify_Click" CausesValidation="false" OnClientClick="ExpandPanel();"
                                                TabIndex="12" />
                                            <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Delete.jpg"
                                                CausesValidation="false" TabIndex="13" OnClick="btnDelete_Click" />
                                            <%--<cc1:ConfirmButtonExtender ID="confirmExtender" runat="server" DisplayModalPopupID="popupExtenderConfirm"
                                                TargetControlID="btnDelete">
                                            </cc1:ConfirmButtonExtender>--%>
                                            <asp:Panel ID="pnlMessageConfirm" runat="server" CssClass="modalPopup" Height="140px"
                                                Style="display: none;" Width="400px">
                                                <table width="100%">
                                                    <tr style="height: 100px">
                                                        <td style="height: 100%" align="center">
                                                            <uc1:wucMessage ID="wucMessageConfirm" runat="server" MessageType="Information" Message="Are you sure you want to deleted the selected role?"
                                                                Visible="true" />
                                                        </td>
                                                    </tr>
                                                    <tr style="vertical-align: bottom">
                                                        <td align="center">
                                                            <asp:ImageButton ID="btnConfirm" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Accept.jpg"
                                                                OnClick="btnConfirm_Click" CausesValidation="false" />
                                                            <asp:ImageButton ID="btnCancelConfirm" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Cancel.gif"
                                                                CausesValidation="false" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </asp:Panel>
                                            <cc1:ModalPopupExtender ID="popupExtenderConfirm" runat="server" BackgroundCssClass="modalBackground"
                                                DropShadow="false" PopupControlID="pnlMessageConfirm" TargetControlID="lnkConfirm"
                                                CancelControlID="btnCancelConfirm">
                                            </cc1:ModalPopupExtender>
                                            <asp:LinkButton ID="lnkConfirm" runat="server"></asp:LinkButton>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <asp:UpdatePanel ID="upMessage" runat="server">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
        </Triggers>
        <ContentTemplate>
            <asp:Panel ID="pnlMessage" runat="server" CssClass="modalPopup" Height="140px" Style="display: none;"
                Width="400px">
                <table width="100%">
                    <tr style="height: 100px">
                        <td style="height: 100%" align="center">
                            <uc1:wucMessage ID="wucMessage" runat="server" />
                        </td>
                    </tr>
                    <tr style="vertical-align: bottom">
                        <td align="center">
                            <asp:ImageButton ID="btnAccept" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Accept.jpg"
                                CausesValidation="false" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="popupExtenderMessage" runat="server" BackgroundCssClass="modalBackground"
                DropShadow="false" PopupControlID="pnlMessage" TargetControlID="lnkPopupMessage"
                CancelControlID="btnAccept">
            </cc1:ModalPopupExtender>
            <asp:LinkButton ID="lnkPopupMessage" runat="server"></asp:LinkButton>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="upPermits" runat="server">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnAceptNavigation" EventName="Click" />
        </Triggers>
        <ContentTemplate>
            <asp:Panel ID="pnlPermits" runat="server" CssClass="modalPopup" Height="420px" Style="display: none;"
                Width="400px" ScrollBars="Auto">
                <asp:GridView ID="grvPermits" runat="server" AutoGenerateColumns="False" OnRowDataBound="grvPermits_RowDataBound"
                    SkinID="GridGMAC" Width="100%">
                    <Columns>
                        <asp:BoundField DataField="EntityId" HeaderText="EntityId"  HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"/>
                        <asp:BoundField DataField="EntityName" HeaderText="EntityName" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
                        <asp:TemplateField HeaderText="Entity" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Label ID="lblEntity" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Read" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkRead" runat="server" Checked='<%# Eval("CanRead") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Write" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkWrite" runat="server" Checked='<%# Eval("CanWrite") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Insert" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkInsert" runat="server" Checked='<%# Eval("CanInsert") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Delete" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkDelete" runat="server" Checked='<%# Eval("CanDelete") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                       <%-- <asp:TemplateField HeaderText="Annuled" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkAnnuled" runat="server" Checked='<%# Eval("CanAnnuled") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Flat Amount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkapprove_flat_amount" runat="server" Checked='<%# Eval("CanApproveFlatAmount") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>--%>
                    </Columns>
                </asp:GridView>
                <table width="100%">
                    <tr>
                        <td style="height: 100%" align="right">
                            <asp:ImageButton ID="btnAceptPermits" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Accept.jpg"
                                 CausesValidation="false" />
                            <asp:ImageButton ID="btnCancelPermits" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Cancel.gif"
                                CausesValidation="false" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="popupExtenderPermits" runat="server" BackgroundCssClass="modalBackground"
                DropShadow="false" PopupControlID="pnlPermits" TargetControlID="lnkPopupPermits"
                CancelControlID="btnCancelPermits" OkControlID="btnAceptPermits">
            </cc1:ModalPopupExtender>
            <asp:LinkButton ID="lnkPopupPermits" runat="server"></asp:LinkButton>
        </ContentTemplate>
    </asp:UpdatePanel>
<%--    <asp:UpdatePanel ID="Reports" runat="server">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnAceptPermits" EventName="Click" />
        </Triggers>
        <ContentTemplate>
            <asp:Panel ID="pnlReports" runat="server" CssClass="modalPopup" Height="420px" Style="display: none;"
                Width="400px" ScrollBars="Auto">
                <asp:GridView ID="grvReports" runat="server" AutoGenerateColumns="False" SkinID="GridGMAC"
                    Width="100%">
                    <Columns>
                        <asp:TemplateField HeaderText="Report Name" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:HiddenField ID="hidReportID" runat="server" Value='<%# Eval("ReportID") %>' />
                                <asp:Label ID="lblReportName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Active" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkReportActive" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <table width="100%">
                    <tr>
                        <td style="height: 100%" align="right">
                            <asp:ImageButton ID="btnAceptReports" runat="server" CausesValidation="false" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Accept.jpg" />
                            <asp:ImageButton ID="btnCancelReports" runat="server" CausesValidation="false" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Cancel.gif" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="popupExtenderReports" runat="server" BackgroundCssClass="modalBackground"
                DropShadow="false" PopupControlID="pnlReports" TargetControlID="lnkPopupReports"
                CancelControlID="btnCancelReports" OkControlID="btnAceptReports">
            </cc1:ModalPopupExtender>
            <asp:LinkButton ID="lnkPopupReports" runat="server"></asp:LinkButton>
        </ContentTemplate>
    </asp:UpdatePanel>--%>
    <asp:UpdatePanel ID="upNavig" runat="server">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnPermits" EventName="Click" />
        </Triggers>
        <ContentTemplate>
            <asp:Panel ID="pnlNavigation" runat="server" CssClass="modalPopup" Height="440px"
                Style="display: none;" Width="400px" ScrollBars="Auto">
                <asp:GridView ID="grvNavigation" runat="server" AutoGenerateColumns="False" SkinID="GridGMAC"
                    DataKeyNames="MenuId" Width="100%">
                    <Columns>
                        <asp:TemplateField HeaderText="Menu" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Label ID="lblMenu" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="SubMenu" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:GridView ID="grvSubMenu" runat="server" AutoGenerateColumns="False" DataSource='<%# Eval("SubMenus") %>'
                                    Width="100%" ShowHeader="False">
                                    <Columns>
                                        <asp:TemplateField ShowHeader="False">
                                            <ItemTemplate>
                                                <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle Width="200px" />
                                        </asp:TemplateField>
                                        <asp:TemplateField ShowHeader="False">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="chkActive" runat="server" />
                                            </ItemTemplate>
                                            <ItemStyle Width="100px" />
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <table width="100%">
                    <tr>
                        <td style="height: 100%" align="right">
                            <asp:ImageButton ID="btnAceptNavigation" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Accept.jpg"
                                CausesValidation="false" OnClick="btnAceptNavigation_Click" />
                            <asp:ImageButton ID="btnCancelNavigation" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Cancel.gif"
                                CausesValidation="false" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="popupExtenderNavigation" runat="server" BackgroundCssClass="modalBackground"
                DropShadow="false" PopupControlID="pnlNavigation" TargetControlID="lnkPopupNavigation"
                CancelControlID="btnCancelNavigation" >
            </cc1:ModalPopupExtender>
            <asp:LinkButton ID="lnkPopupNavigation" runat="server"></asp:LinkButton>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
